﻿using BCCommon.OAEnums;
using BCEntity.OA.Notification.NotificationRecord;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace BCData.OA.Notification.NotificationRecord
{
    /// <summary>
    /// OA系统通知记录
    /// </summary>
	public interface INotificationRecordData
    {
        #region  成员方法
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="notificationRecordId">OA系统通知记录Id</param>
        Task<bool> Exists(long notificationRecordId);
        /// <summary>
        /// 增加OA系统通知记录
        /// </summary>
        /// <param name="entity">OA系统通知记录信息</param>
        Task<NotificationRecordEntity> Add(NotificationRecordEntity entity);
        /// <summary>
        /// 增加OA系统通知记录
        /// </summary>
        /// <param name="entity">OA系统通知记录信息</param>
        Task<bool> AddForProcedure(NotificationRecordEntity entity);
        /// <summary>
        /// 增加OA系统通知记录
        /// </summary>
        /// <param name="entities">OA系统通知记录信息列表</param>
        Task<bool> Add(List<NotificationRecordEntity> entities);
        /// <summary>
        /// 更新OA系统通知记录
        /// </summary>
        /// <param name="entity">OA系统通知记录信息</param>
        Task<NotificationRecordEntity> Update(NotificationRecordEntity entity);
        /// <summary>
        /// 删除OA系统通知记录
        /// </summary>
        /// <param name="notificationRecordId">OA系统通知记录Id</param>
        Task<bool> Delete(long notificationRecordId);
        /// <summary>
        /// 获取OA系统通知记录
        /// </summary>
        /// <param name="notificationRecordId">OA系统通知记录Id</param>
        Task<NotificationRecordEntity> GetEntity(long notificationRecordId);
        /// <summary>
        /// 获取OA系统通知记录
        /// </summary>
        /// <param name="notificationCategoryCode">OA系统通知分类编码</param>
        /// <param name="relatedReferenceNo">相关引用编号</param>
        Task<NotificationRecordEntity> GetEntity(string notificationCategoryCode,string relatedReferenceNo);
        /// <summary>
        /// 获取OA系统通知记录列表
        /// </summary>
        Task<IEnumerable<NotificationRecordEntity>> GetList();
        /// <summary>
        /// 获取OA系统通知记录列表
        /// </summary>
        /// <param name="relatedType">相关类型</param>
        /// <param name="status">处理状态</param>
        /// <param name="companyId">公司Id</param>
        /// <param name="departmentId">部门Id</param>
        /// <param name="jobTitle">职位</param>
        /// <param name="adminId">管理员Id</param>
        /// <returns></returns>
        Task<IEnumerable<NotificationRecordSumViewEntity>> GetNotificationList(OARelatedType relatedType, OAProcessStatus status, long companyId, long departmentId, string jobTitle, long adminId);
        /// <summary>
        /// 获取OA系统通知记录分页列表
        /// </summary>
        /// <param name="relatedType">相关类型</param>
        /// <param name="status">处理状态</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">OA系统通知记录每页数据条数</param>
        Task<(IEnumerable<NotificationRecordEntity>, int)> Query(OARelatedType relatedType, OAProcessStatus processStatus, DateTime? start, DateTime? end, int pageIndex, int pageSize);
        #endregion  成员方法
    }
}

